import type { AddressItem } from "@/types/address";
import { defineStore } from "pinia";
import { ref } from "vue";

export const useAddressStore= defineStore('address',()=>{
	const selectedAddress = ref<AddressItem>()

	// 更改收货地址
	const changeSelectedAddress= (val:AddressItem)=>{
		selectedAddress.value = val
	}

	// 返回数据
	return{
		selectedAddress,
		changeSelectedAddress
	}
})